Skip to content

search result links and cleans up the unused variables in layout.jsx#2369

Open
Adi-Codes-well wants to merge 1 commit intojenkins-infra:mainfrom
Adi-Codes-well:plugin-page-card-issue-2352
Open

search result links and cleans up the unused variables in layout.jsx#2369
Adi-Codes-well wants to merge 1 commit intojenkins-infra:mainfrom
Adi-Codes-well:plugin-page-card-issue-2352

Conversation

@Adi-Codes-well
Copy link

Issue: #2352

PR Title: feat: Allow search results to open in new tab and fix lint warnings

This PR fixes the search result links and cleans up the unused variables in layout.jsx.

  1. Enables Opening Search Results in a New Tab

Currently, the search result items on the plugin index page are rendered as div elements with an onClick handler. This prevents users from using standard browser functionality like middle-clicking or Ctrl+Click to open plugin pages in a new tab, which is frustrating for users who want to compare multiple plugins.

This change replaces the div with a standard HTML tag, restoring the expected browser behavior and improving usability.

Fix video.zip

  1. Removes Unused Variables in layout.jsx
    The layout.jsx component contained two unused variables (buildTime and siteUrl) that were triggering ESLint no-unused-vars warnings during development. This change removes the unused variables, cleaning up the code and resolving the linting errors.

@Adi-Codes-well Adi-Codes-well requested a review from a team as a code owner September 7, 2025 21:34
@zbynek
Copy link
Contributor

zbynek commented Sep 7, 2025

As per https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/a#technical_summary it's not allowed to have <a> nested in other <a> elements, which caused some warnings during development, that's why the top level link is a <div>.

We could do one/both of

  • wrap the the plugin name in <a> to make that a link
  • enhance the card click handler to check for Ctrl+Click and open the page in a new tab in that case

@Adi-Codes-well Adi-Codes-well changed the title search result links and cleans up the unused variables in layout.jsx #2352 search result links and cleans up the unused variables in layout.jsx Sep 8, 2025
@Adi-Codes-well
Copy link
Author

Adi-Codes-well commented Sep 9, 2025

Currently, I have replaced the outer <div> with an <a> tag. Is there anything wrong with this?

@Adi-Codes-well Adi-Codes-well marked this pull request as draft September 9, 2025 10:15
@Adi-Codes-well Adi-Codes-well marked this pull request as ready for review September 9, 2025 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants